
<?php //use_javascript('/webmessenger/functions');?>
<!-- ДЛЯ ЧАТА -->
<script src="<?php echo sfConfig::get('app_site_url') ?>/webmessenger/functions.js" type="text/javascript" language="javascript"></script>
<!-- ДЛЯ ЧАТА -->


<!-- ДЛЯ ЧАТА -->
<?php if ($sf_user->isAuthenticated()): ?>
<?php


define("_presenceID",2858);
/*	This is the presenceID from Userplane, it will be included with your Flashcom info email */
	define("_strPassword",'Mehw3930');
/*	This is the password associated with your presenceID, this will also be included in your
	Flashcom info email and will be the same as your general account password */
	define("_wmURL", sfConfig::get('app_site_url').'/index.php/Chat/wm');
 //   define("_wmURL", 'http://www.sunflowermarriageagency.com/webmessenger/webmessenger/wm.php');
/*	This is the full URL to your webmessenger.php file, this is needed for
	the windows to open on the other users browser.
*/
	define("_cmdURL", sfConfig::get('app_site_url').'webmessenger/webmessenger/cmd.php');

	include(sfConfig::get('sf_web_dir').'/webmessenger/presence/presence.php');

			$strUserID = sfContext::getInstance()->getUser()->getAttribute( 'user_id', null, 'sfGuardSecurityUser' );
		/*	This is the userID of the person that is viewing this page.  This value must be an integer.
		*/

			$presenceID = _presenceID;
		/*	This is the presenceID from Userplane, it will be included with your Flashcom info email
		*/
			$strPassword = _strPassword;
		/*	This is the password associated with your presenceID, this will also be included in your
			Flashcom info email and will be the same as your general account password
		*/
		//	$strTargetUserID = 1234;
		/*	This is the ID of the user that you are trying to IM
		*/
			$wmURL = _wmURL;
		/*	This is the full URL to your webmessenger.php file, this is needed for
			the windows to open on the other users browser.
		*/
			$cmdURL = _cmdURL;
		/*	This is the full URL to your cmd.php file, this is needed for
			the user to know when someone declines their IM request.
		*/

			$notify = 'true';

				/*	This is the code needed to log this user into Userplane presence.
				*/
					//up_presence($presenceID , $strPassword , $strUserID , $wmURL , $cmdURL );

?>
<?php endif ?>
<!-- ДЛЯ ЧАТА -->

			<?php if ($sf_user->isAuthenticated()): ?>
				                  <?php echo jq_periodically_call_remote(array(
					'frequency' => 20,
                                        'update' => 'chat_call',
                                        'script'=>true,
                                        'method'=>'GET',
					'url' => sfConfig::get('app_site_url').'/cgi/c.php?i='.$sf_user->getAttribute( 'user_id', null, 'sfGuardSecurityUser' ),
			)) ?>


			 <?php endif ?>

<script src="/js/jquery.tools.min.js"></script>



<style>
.modal {
    background-color:#fff;
    display:none;
    width:350px;
    padding:15px;
    text-align:left;
    border:2px solid #333;

    opacity:0.8;
    -moz-border-radius:6px;
    -webkit-border-radius:6px;
    -moz-box-shadow: 0 0 50px #ccc;
    -webkit-box-shadow: 0 0 50px #ccc;
}

.modal h2 {
    background:url(/img/global/info.png) 0 50% no-repeat;
    margin:0px;
    padding:10px 0 10px 45px;
    border-bottom:1px solid #333;
    font-size:20px;
}
</style>


<div id="chat_call"></div>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12301644-1");
pageTracker._trackPageview();
} catch(err) {}</script> 
